//
//  HBSettingHeaderCell.m
//  HuoBao
//
//  Created by chaiyanan on 15/12/4.
//  Copyright © 2015年 jinxin. All rights reserved.
//

#import "HBSettingHeaderCell.h"

@implementation HBSettingHeaderCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self)
    {
        self.backgroundColor = [LCCommon getColor:@"37383d"];
        [self createCustomView];
    }
    return self;
}

- (void)createCustomView
{
    self.headImageView = [[UIImageView alloc]initWithFrame:CGRectMake(15, (Height_HBSettingHeaderCell-50)/2, 50, 50)];
    self.headImageView.layer.cornerRadius = 50/2.0f;
    self.headImageView.layer.masksToBounds = YES;
    
    self.nameLable = [[UILabel alloc]initWithFrame:CGRectMake(self.headImageView.y+self.headImageView.width+10, 25, SCREEN_WIDTH-(self.headImageView.y+self.headImageView.width+10), 16)];
    self.nameLable.font = [UIFont systemFontOfSize:16.0f];
    self.nameLable.textColor = [LCCommon getColor:@"999999"];
    self.nameLable.textAlignment = NSTextAlignmentLeft;
    
    self.phoneLable = [[UILabel alloc]initWithFrame:CGRectMake(self.headImageView.y+self.headImageView.width+10, 50, SCREEN_WIDTH-(self.headImageView.y+self.headImageView.width+10), 13)];
    self.phoneLable.textAlignment = NSTextAlignmentLeft;
    self.phoneLable.font = [UIFont systemFontOfSize:13.0f];
    self.phoneLable.textColor = [LCCommon getColor:@"999999"];
    
    UIImage *image = [UIImage imageNamed:@"income_zhaiquan"];
    self.arrowImageView = [[UIImageView alloc]initWithImage:image];
    self.arrowImageView.frame = CGRectMake(SCREEN_WIDTH-15-image.size.width, (Height_HBSettingHeaderCell-image.size.height)/2, image.size.width, image.size.height);
    
    [self.contentView addSubview:self.headImageView];
    [self.contentView addSubview:self.nameLable];
    [self.contentView addSubview:self.phoneLable];
    [self.contentView addSubview:self.arrowImageView];
}

@end
